﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Forum.aspx.cs" Inherits="Forum_Forum" ValidateRequest="false" %>
<%@ Reference Control="~/Course/UserControls/ForumMessage.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="margin: 10px;">
        <asp:Label ID="lblForumTitle" runat="server" Font-Size="20pt"></asp:Label><br />
        <asp:Label ID="lblforumText" runat="server" Font-Size="10pt"></asp:Label><br />
        <asp:Label ID="ErrorMessage" runat="server" Font-Size="14pt" ForeColor="DarkRed"></asp:Label>
        <table style="width: 600px; background-color: #eeeeff; border: 1px solid black;">
            <tr>
                <td>
                    Thread Title:<br />
                    <asp:TextBox ID="NewThread" runat="server" Width="90%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnAddThread" runat="server" Text="Add Thread" OnClick="AddThread" />
                </td>
            </tr>
        </table>
        <br />
        <asp:Repeater ID="RepThreads" runat="server"></asp:Repeater>
        <asp:UpdatePanel ID="upnlMessages" runat="server">
        <ContentTemplate>
            <table style="width: 600px; background-color: #eeeeff; border: 1px solid black;">
                <tr>
                    <td>
                        Message Title:<br />
                        <asp:TextBox ID="NewTitle" runat="server" Width="90%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Message Body:<br />
                        <asp:TextBox ID="NewMessage" runat="server" TextMode="MultiLine" Height="100" Width="90%"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnPostMessage" runat="server" Text="Post Message" OnClick="PostMessage" />
                    </td>
                </tr>
            </table>
            <br />
            <asp:Repeater ID="RepMessages" runat="server"></asp:Repeater>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
